package org.leslie.service.impl;

import org.leslie.pojo.EmailProperties;
import org.leslie.service.EmailService;
import org.leslie.utils.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private EmailProperties emailProperties;

    @Override
    public boolean send(String to, String subject, String content) {
        System.out.println(emailProperties);
        return MailUtil.sendMail(emailProperties, to, subject, content);
    }
}
